<?php
/**
 * Created by PhpStorm.
 * User: liubin
 * Date: 16/9/27
 * Time: 上午9:20
 */

namespace api\Model;

use Think\Model;

class JobEntityModel extends Model
{
    function __construct() {
        $this->model = M('JobEntity');
    }

    public function getJob() {
        $data = $this->model->order('add_at asc')->select();
        $data = $data ? $data : array();
        return $data;
    }

    public function jobinfo($id) {
        $data = $this->model->where('job_id='.$id)->order('add_at asc')->find();
        //echo $this->model->_sql();die;
        $data = $data ? $data : array();
        return $data;
    }

}